def twoSum(nums,target):
    lens=len(nums)
    for i in range(lens):
        temp=nums[:i]
        if (target-nums[i]) in temp:
            j=temp.index(target-nums[i])
            break
    if j>=0:
        return [i,j]